<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>

<?php include_http_metas() ?>
<?php include_metas() ?>

<?php include_title() ?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php 
$module = $sf_context->getModuleName();
$action = $sf_context->getActionName();
?>
<?php
	if(($module=="customer_care") && ($action =="download"))
	{
		
	}
	else 
	{
		use_javascript('jquery.js');
		use_javascript('thickbox.js');	
	}
 ?>
<?php use_stylesheet('thickbox.css') ?>
<?php use_javascript('main.js') ?>
<?php use_javascript('approve.js') ?>

<?php include_javascripts() ?>
<?php include_stylesheets() ?>



<link rel="shortcut icon" href="/favicon.ico" />

</head>
<body onload="updateComposerName()">
<?php 
$request = sfContext::getInstance()->getRequest();
$ringtoneType = $request->getParameter('nhac');
$module = $sf_context->getModuleName();
$action = $sf_context->getActionName();
?>
<div id="main-menu">
                            <?php  if  (($module == 'ringtone_origin')||($module == 'convert_song') || ($module == 'ringtone') || ($module == 'beat') || ($module == 'ringtone_remove')):?>
                                    <a href ="javascript:void(0)">
                                        <div class="selected main-menu-items" >Quản lý nội dung</div>
                                    </a>
                            <?php else:?>
                                    <a href ="/ringtone/list?nhac=cho">
                                        <div class="main-menu-items" >Quản lý nội dung</div>
                                    </a>
                            <?php endif;?>
                           <?php if($sf_user->isAuthenticated()):?>
                                <?php    $user_name = $sf_user->getUserName();?>
                                <?php //if(($user_name!='cskh')&&($user_name!='tung')&&($user_name!='khanhdd')&&($user_name!='karaoke')&&($user_name!='sangtao')&&($user_name!='quannv')):?>
                                <?php if(($user_name!='cskh')&&($user_name!='khanhdd')&&($user_name!='karaoke')&&($user_name!='sangtao')&&($user_name!='quannv')):?>
                                    <?php if  (($module == 'sfGuardUser')||($module == 'sfGuardGroup')||($module == 'sfGuardPermission')):?>
                                            <a href ="javascript:void(0)">
                                                <div class="selected main-menu-items" >HỆ THỐNG</div>
                                            </a>
                                    <?php else:?>
                                            <a href ="/sfGuardUser?duyet=user">
                                                <div class="main-menu-items" >HỆ THỐNG</div>
                                            </a>
                                    <?php endif;?>
                                    <?php if  (($module == 'alert')||($module == 'ringtone_alert')):?>
                                            <a href ="javascript:void(0)">
                                                <div class="selected main-menu-items" >BÁO CÁO</div>
                                            </a>
                                    <?php else:?>
                                            <a href ="/alert/commonStatistic">
                                                <div class="main-menu-items" >BÁO CÁO</div>
                                            </a>
                                    <?php endif;?>
                                <?php endif;?>
                            <?php endif;?>
                            <?php if  (($module == 'customer_care') ||($module == 'cc_question') || ($module == 'user_detail')|| ($module == 'profile')):?>
                                    <a href ="javascript:void(0)">
                                        <div class="selected main-menu-items" >CSKH</div>
                                    </a>
                            <?php else:?>
                                    <a href ="/customer_care/sms">
                                        <div class="main-menu-items" >CSKH</div>
                                    </a>
                            <?php endif;?>
                            <?php if  (($module == 'idol')) :?>
                                    <a href ="javascript:void(0)">
                                        <div class="selected main-menu-items" >IDOL</div>
                                    </a>
                            <?php else:?>
                                    <a href ="/idol/list">
                                        <div class="main-menu-items" >IDOL</div>
                                    </a>
                            <?php endif;?>
    
                            <?php if  ($module == 'rt_approve_comment' || $module == 'ring_news' || $module == 'synchronize' || $module == 'user_notice' || $module == 'ringtone_comment' || $module == 'user_comment' || $module == 'FaqItems' || $module == 'ringtone_xml'):?>
                                    <a href ="javascript:void(0)">
                                        <div class="selected main-menu-items" >KHÁC</div>
                                    </a>
                            <?php else:?>
                                    <a href ="/rt_approve_comment/list?sort=id&type=desc">
                                        <div class="main-menu-items" >KHÁC</div>
                                    </a>
                            <?php endif;?>
                            <div id="my-link">
                                <?php if($sf_user->isAuthenticated()):?>                                
                                <b><?php echo $sf_user->getUserName(); ?></b> <?php echo link_to('Logout', 'logout'); ?>
                                <?php endif;?>
                            </div>
                            <div style ="clear:both"></div>
                        </div>
<div id="header">
	<table style="width: 100%">
                
		<tr>
		    <td>
		        <ul id="menu">        
		        <!-- <li><?php echo link_to('TRANG CHỦ¦', ''); ?></li> -->
                           <?php if  (($module == 'ringtone_origin') || ($module == 'convert_song') || ($module == 'ringtone') || ($module == 'beat') ||  ($module == 'ringtone_remove')):?>
                                <?php if  ($module == 'ringtone' && $ringtoneType == "chuong"):?>
                                        <li class="selected">NHẠC CHUÔNG</li>
                                <?php else:?>
                                        <li><?php echo link_to('NHẠC CHUÔNG', 'ringtone/list?nhac=chuong'); ?></li>
                                <?php endif;?>
                                        
                                <?php if  ($module == 'ringtone' && $ringtoneType == "cho"):?>
                                        <li class="selected">NHẠC CHỜ</li>
                                <?php else:?>
                                        <li><?php echo link_to('NHẠC CHỜ', 'ringtone/list?nhac=cho&duyet=tatca'); ?></li>
                                <?php endif;?>

                                <?php if  (($module == 'ringtone_origin')||($module == 'convert_song')):?>
                                        <li class="selected">BẢN THU</li>
                                <?php else:?>
                                        <li><?php echo link_to('BẢN THU', 'ringtone_origin/list?sort=created_datetime&type=desc'); ?></li>
                                <?php endif;?>

							
                                <?php if  ($module == 'beat'):?>
                                        <li class="selected">BEAT</li>
                                <?php else:?>
                                        <li><?php echo link_to('BEAT', 'beat/list?sort=created_datetime&type=desc'); ?></li>
                                <?php endif;?>
                                 <?php if  ($module == 'ringtone_remove'):?>
                                        <li class="selected">XÓA</li>
                                <?php else:?>
                                        <li><?php echo link_to('XÓA', 'ringtone_remove/list'); ?></li>
                                <?php endif;?>
                            <?php endif;?>
                            <?php if  (($module == 'customer_care') ||($module == 'cc_question') || ($module == 'user_detail') || ($module == 'profile')):?>
                                <?php if  (($module == 'customer_care')&&($action == 'sms')):?>
                                        <li class="selected">SMS</li>
                                <?php else:?>
                                        <li><?php echo link_to('SMS', 'customer_care/sms'); ?></li>
                                <?php endif;?>
                                 <?php if  (($module == 'customer_care')&&($action == 'download')):?>
                                        <li class="selected">Download</li>
                                <?php else:?>
                                        <li><?php echo link_to('Download', 'customer_care/download'); ?></li>
                                <?php endif;?>        
                                <?php if  ($module == 'cc_question'):?>
                                        <li class="selected">CC</li>
                                <?php else:?>
                                        <li><?php echo link_to('CC', 'cc_question/list?sort=id&type=desc'); ?></li>
                                <?php endif;?>

                                <?php if  ($module == 'user_detail'):?>
                                        <li class="selected">Tra cứu user</li>
                                <?php else:?>
                                        <li><?php echo link_to('Tra cứu user', 'user_detail'); ?></li>
                                <?php endif;?>
                                <?php if  ($module == 'profile'):?>
                                        <li class="selected">Đổi mật khẩu</li>
                                <?php else:?>
                                        <li><?php echo link_to('Đổ mật khẩu', 'profile'); ?></li>
                                <?php endif;?>
                             <?php endif;?>	   
                           <?php if  ($module == 'idol'):?>
                                <?php if  (($module == 'idol')&&($action == 'list')):?>
                                        <li class="selected">Danh sách bản thu</li>
                                <?php else:?>
                                        <li><?php echo link_to('Danh sách bản thu', 'idol/list'); ?></li>
                                <?php endif;?>
                                 <?php if  (($module == 'idol')&&($action == 'memberlist')):?>
                                        <li class="selected">Danh sách thí sinh</li>
                                <?php else:?>
                                        <li><?php echo link_to('Danh sách thí sinh', 'idol/memberlist'); ?></li>
                                <?php endif;?>        
                                <?php if  (($module == 'idol')&&($action == 'beat')):?>
                                        <li class="selected">Danh sách beat tham khảo</li>
                                <?php else:?>
                                        <li><?php echo link_to('Danh sách beat tham khảo', 'idol/beat'); ?></li>
                                <?php endif;?>

                                <?php if  (($module == 'idol')&&($action == 'news' || $action == 'createnews'|| $action == 'editnews') ):?>
                                        <li class="selected">Tin tức</li>
                                <?php else:?>
                                        <li><?php echo link_to('Tin tức', 'idol/news'); ?></li>
                                <?php endif;?>
                                <?php if  (($module == 'idol')&&($action == 'statist')):?>
                                        <li class="selected">Thống kê</li>
                                <?php else:?>
                                        <li><?php echo link_to('Thống kê', 'idol/statist'); ?></li>
                                <?php endif;?>
                             <?php endif;?>	             
		        </ul>
		    </td>
		
		    
		    <div class="clear-fix"></div>
		</tr>
	</table>
</div>
<div id="submenu-wrapper">
	<?php if (has_slot('submenu')): ?>
	  <?php include_slot('submenu') ?>
	<?php endif; ?>
</div>




<div id="content">
<div id="right">

<?php echo $sf_data->getRaw('sf_content') ?>
</div>
</div>
<script type="text/javascript">
       function show(){
           document.getElementById('main-menu-content-items').style.display = 'block';
       }
       function hide(){
           document.getElementById('main-menu-content-items').style.display = 'none';
       }
</script>
</body>
</html>
